package entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author Lei
 * @create 2021-04-15 18:48
 */
@Entity
@Table(name = "zyb", schema = "ssh", catalog = "")
public class ZybEntity {
    private int id;
    private String zym;
    private Integer rs;
    private String fdy;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "zym")
    public String getZym() {
        return zym;
    }

    public void setZym(String zym) {
        this.zym = zym;
    }

    @Basic
    @Column(name = "rs")
    public Integer getRs() {
        return rs;
    }

    public void setRs(Integer rs) {
        this.rs = rs;
    }

    @Basic
    @Column(name = "fdy")
    public String getFdy() {
        return fdy;
    }

    public void setFdy(String fdy) {
        this.fdy = fdy;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZybEntity zybEntity = (ZybEntity) o;
        return id == zybEntity.id &&
                Objects.equals(zym, zybEntity.zym) &&
                Objects.equals(rs, zybEntity.rs) &&
                Objects.equals(fdy, zybEntity.fdy);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, zym, rs, fdy);
    }
}
